<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Login</title>
    <link rel="stylesheet" th:href="@{/css/style.css}" />
</head>
<body>
<header>
    <div class="container">
        <div id="branding">
            <h1>图书管理系统登陆页面</h1>
        </div>
        <nav>
            <ul>
                <li><a th:href="@{/}">主页</a></li>
                <li><a th:href="@{/register}">注册</a></li>
            </ul>
        </nav>
    </div>
</header>
<div class="container">
    <h1>Login</h1>
    <form th:action="@{/login}" method="post">
        <div><label>Username: <input type="text" name="username" required></label></div>
        <div ><label>Password: <input type="password" name="password" required></label></div>
        <div th:if="${error}" class="error">Invalid username or password</div>
        <div th:if="${logout}" class="success">You have been logged out</div>
        <div><input type="submit" value="Login"></div>
    </form>
</div>
</body>
</html>
